#include<iostream>
using namespace std;
const int N=100010;
void insert(int a[],int l,int r,int c){
  a[l]+=c;
  a[r+1]-=c;
}
int main(){
  int a[N],b[N];
  int n,m,c;
  cin>>n>>m;
  for(int i=1;i<=n;i++){
    scanf("%d",&a[i]);
    b[i]=a[i]-a[i-1];
  }
  while(m--){
    int l,r,c;
    cin>>l>>r>>c;
    insert(b,l,r,c);
  }
  for(int i=1;i<=n;i++){
    b[i]+=b[i-1];
    printf("%d ", b[i]);
  }
  return 0;
}
